<script>
  document.write(opener.location);
  opener.document.writeln("writed by new window");
</script>
<p>
<a href=# onClick="opener.focus()">Return the focus to the original window</a>
<a href=# onClick="window.close()">Close</a>
